package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Userpet;
import com.pets.springboot_petshop.mapper.UserpetMapper;
import com.pets.springboot_petshop.service.UserpetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/12 下午4:46 周六
 * @Description: 用户宠物文档实现类
 */
@Service
public class UserpetServiceImpl implements UserpetService {
    @Autowired
    private UserpetMapper userpetMapper;

    @Override
    public Userpet selectUserpetid(int id) {
        return userpetMapper.selectUserpetid(id);
    }

    @Override
    public List<Userpet> selectUserpetUserid(int user_id) {
        return userpetMapper.selectUserpetUserid(user_id);
    }

    @Override
    public List<Userpet> findAll() {
        return userpetMapper.findAll();
    }

    @Override
    public int addUserpet(Userpet userpet) {
        return userpetMapper.addUserpet(userpet);
    }

    @Override
    public int deleteUserpetById(int id) {
        return userpetMapper.deleteUserpetById(id);
    }

    @Override
    public int updateUserpetById(Userpet userpet) {
        return userpetMapper.updateUserpetById(userpet);
    }

    @Override
    public int updateimg(Userpet userpet) {
        return userpetMapper.updateimg(userpet);
    }
}
